#This is adapted from Richardson's book <<Advanced Programming in the Unix Environment>>.
#On Page 273. You can 
#kill -USR1 processNO
#kill -USR2 processNO
#to see the effect.

#This is also a simple model for large programs.
targetFile=main
targetFile2 = sendSignal

.PHONY: clean run all

all: $(targetFile) $(targetFile2)

$(targetFile): $(targetFile).c
	gcc $(targetFile).c -o $(targetFile) 
$(targetFile2): $(targetFile2).cpp
	g++ $(targetFile2).cpp -o $(targetFile2) 
run:
	./$(targetFile) &
	./$(targetFile2)

clean:
	rm -f $(targetFile) $(targetFile2)
